#!/usr/bin/env Rscript
library(ggplot2)

args <- commandArgs(TRUE)
infile <- args[[1]]
outfile <- args[[2]]

trace <-as.data.frame(read.csv(infile, skip=2, header=FALSE))
p <- ggplot(trace) + aes(x=V1, y=V2) +
     geom_point(color='red') +
     xlab('Time (s)') + ylab('Voltage (V)') + ggtitle(infile)
ggsave(p, filename=outfile, width=12, height=4)
